#ifndef _RESULT_DEFINE_INCLUDE 
#define _RESULT_DEFINE_INCLUDE

// eResult values. Reture value definition.
typedef unsigned int eResult;
#define DEFINE_RESULT(name, value) static const eResult name = value;

//General return value.
DEFINE_RESULT(RET_OK, 					0)
DEFINE_RESULT(RET_ASYNCWAIT, 			1)
DEFINE_RESULT(RET_ERROR, 				100)
DEFINE_RESULT(RET_TIMEOUT, 				101)
DEFINE_RESULT(RET_CREATEDIR_FAIL, 		102)
DEFINE_RESULT(RET_CREATFILE_FAIL, 		103)
DEFINE_RESULT(RET_PARAM_INVALID, 		104)
DEFINE_RESULT(RET_NO_INTERFACE, 		104)
DEFINE_RESULT(RET_SIZE_ERROR, 			106)
DEFINE_RESULT(RET_NOT_FOUND, 			107)
DEFINE_RESULT(RET_PARTIAL, 				108)
DEFINE_RESULT(RET_BREAK, 				109)
DEFINE_RESULT(RET_CONTINUE, 			110)
DEFINE_RESULT(RET_END, 					111)
DEFINE_RESULT(RET_UNKNOWN, 				112)
DEFINE_RESULT(RET_EXIST, 				113)
DEFINE_RESULT(RET_BUSY, 				114)

// Return value for DataCacheManager.
DEFINE_RESULT(RET_LASTSEG, 				200)
DEFINE_RESULT(RET_TOO_FAST, 			201)
DEFINE_RESULT(RET_NO_SPACE, 			202)
DEFINE_RESULT(RET_FULL, 				203)
DEFINE_RESULT(RET_IN_CHAIN_NODE, 		204)
DEFINE_RESULT(RET_OUT_CHAIN_NODE, 		205)

// Return value for file operate.
DEFINE_RESULT(RET_FILE_NOTFOUNF,		300)
DEFINE_RESULT(RET_FILE_ACCESSDENIED,	301)

//Return value for NetworkIO.
DEFINE_RESULT(RET_BIND_ERROR, 				400)
DEFINE_RESULT(RET_LISTEN_ERROR,				401)
DEFINE_RESULT(RET_IO_CONNECT_CLOSED,		402) 
DEFINE_RESULT(RET_IO_RECEIVE_COMPLETED,		403)
DEFINE_RESULT(RET_IO_RECEIVE_OVERFLOW,		404)
DEFINE_RESULT(RET_IO_RECEIVE_NO_DATA,		405)
DEFINE_RESULT(RET_IO_SEND_COMPLETED,		406)
DEFINE_RESULT(RET_IO_SEND_PART_COMPLETED,	407)
DEFINE_RESULT(RET_IO_SEND_PENDING,			408)
DEFINE_RESULT(RET_IO_RECEIVE_PENDING,		409)
DEFINE_RESULT(RET_IO_CLOSE_PENDING,			410)
DEFINE_RESULT(RET_IO_OK,					411)
DEFINE_RESULT(RET_IO_ERROR,					412)
DEFINE_RESULT(RET_IO_ERRSIZE,				413)

//Return value for P2PCore
DEFINE_RESULT(RET_PROTOCOL_ERROR,			500)
DEFINE_RESULT(RET_IGNORE,					501)

// Return code for Download Item.
DEFINE_RESULT(RET_TRY_NOPARTIAL,  			600)

// Return code for eHalo.
DEFINE_RESULT(RET_FILE_MODIFIED,			700)
DEFINE_RESULT(RET_FILE_NON_MODIFIED,		701)
DEFINE_RESULT(RET_FILE_NO_FIND,				702)	

#endif
